home *** CD-ROM | disk | FTP | other *** search
- <%
- '+-------------------------------------------------------------------------
- '
- ' Microsoft Windows Media
- ' Copyright (C) Microsoft Corporation. All rights reserved.
- '
- ' File: plugin_loading.inc
- '
- ' Contents: server-side included with certain plugin property pages
- '
- '--------------------------------------------------------------------------
-
-
- 'enum WMS_PLUGIN_LOAD_TYPE
- Const WMS_PLUGIN_LOAD_TYPE_UNSPECIFIED = 0
- Const WMS_PLUGIN_LOAD_TYPE_IN_PROC = 1
- Const WMS_PLUGIN_LOAD_TYPE_OUT_OF_PROC = 2
- Const WMS_NUM_PLUGIN_LOAD_TYPE = 3
-
- 'enum WMS_PLUGIN_UNSUPPORTED_LOAD_TYPE
- Const WMS_PLUGIN_UNSUPPORTED_LOAD_TYPE_NONE = 0
- Const WMS_PLUGIN_UNSUPPORTED_LOAD_TYPE_IN_PROC = 1
- Const WMS_PLUGIN_UNSUPPORTED_LOAD_TYPE_OUT_OF_PROC = 2
-
- Dim enumLoaded
- Dim enumLoadSetting
- Dim enumDefaultLoadSetting
- Dim enumPluginUnsupportedLoadType
- Dim bLoadedInProc
- Dim bLoadInProc
- Dim strInProcess
- Dim strOutOfProcess
- Dim strCurrentLoadType
-
- '////////////////////////////////////////////////////////////////////////////////////
- function HandlePluginLoadingChanges()
- if( 0 = strComp( "inproc", GetPostOrQsVal( "pluginloading" ), vbTextCompare ) ) then
- if( WMS_PLUGIN_LOAD_TYPE_IN_PROC <> g_objPlugin.LoadType ) then
- g_objPlugin.LoadType = WMS_PLUGIN_LOAD_TYPE_IN_PROC
- end if
- elseif( 0 = strComp( "outofproc", GetPostOrQsVal( "pluginloading" ), vbTextCompare ) ) then
- if( WMS_PLUGIN_LOAD_TYPE_OUT_OF_PROC <> g_objPlugin.LoadType ) then
- g_objPlugin.LoadType = WMS_PLUGIN_LOAD_TYPE_OUT_OF_PROC
- end if
- end if
- end function
-
- '////////////////////////////////////////////////////////////////////////////////////
- sub RenderPluginLoadingOptions()
- on error resume next
- enumDefaultLoadSetting = g_objServer.DefaultPluginLoadType ' start with default
- enumPluginUnsupportedLoadType = g_objPlugin.Properties( "UnsupportedLoadType" )
- if( IsEmpty( enumPluginUnsupportedLoadType ) )then
- enumPluginUnsupportedLoadType = WMS_PLUGIN_LOAD_TYPE_UNSPECIFIED
- end if
-
- enumLoaded = g_objPlugin.Status
- enumLoadSetting = g_objPlugin.LoadType
- if( WMS_PLUGIN_LOAD_TYPE_UNSPECIFIED = enumLoadSetting ) then
- if( WMS_PLUGIN_LOAD_TYPE_UNSPECIFIED = enumDefaultLoadSetting ) then
- if( WMS_PLUGIN_UNSUPPORTED_LOAD_TYPE_NONE = enumPluginUnsupportedLoadType ) then
- enumLoadSetting = WMS_PLUGIN_LOAD_TYPE_IN_PROC
- elseif( WMS_PLUGIN_UNSUPPORTED_LOAD_TYPE_IN_PROC = enumPluginUnsupportedLoadType ) then ' BUG: what if this isn't supported?
- enumLoadSetting = WMS_PLUGIN_LOAD_TYPE_OUT_OF_PROC
- elseif( WMS_PLUGIN_UNSUPPORTED_LOAD_TYPE_OUT_OF_PROC = enumPluginUnsupportedLoadType ) then ' BUG: what if this isn't supported?
- enumLoadSetting = WMS_PLUGIN_LOAD_TYPE_IN_PROC
- end if
- else
- enumLoadSetting = enumDefaultLoadSetting
- end if
- else
- bLoadInProc = CBool( ( WMS_PLUGIN_LOAD_TYPE_IN_PROC = enumLoadSetting ) )
- end if
-
- if( WMS_PLUGIN_LOAD_TYPE_IN_PROC = enumLoadSetting ) then
- bLoadInProc = TRUE
- strInProcess = L_LOADINPROC_TEXT
- strOutOfProcess = L_LOADOOFPROCRESTART_TEXT
- else
- bLoadInProc = FALSE
- strInProcess = L_LOADINPROCRESTART_TEXT
- strOutOfProcess = L_LOADOOFPROC_TEXT
- end if
-
- if( WMS_PLUGIN_LOADED_IN_PROC and enumLoaded ) then
- strCurrentLoadType = L_LOADEDINPROC_TEXT
- else
- strCurrentLoadType = L_LOADEDOOFPROC_TEXT
- end if
-
- %>
- <p>
- <table border=1 cellspacing=2 cellpadding=0 class="propgroupbox" width="100%">
- <caption align="left" class="pluginGroupHeader"><%= Server.HTMLEncode( L_PLUGINLOADING_TEXT ) %></caption>
- <tr>
- <td> <br>
- <table cellspacing=0 border=0 class="propgroupbox">
- <tr>
- <td><img src="..\img\spacer_.gif" height="1px" width="10px"></td>
- <td class="helptext" bgcolor="lightyellow">
- <%= Server.HTMLEncode( L_LOADED_TEXT ) %> <b><%= Server.HTMLEncode( strCurrentLoadType ) %></b>
- </td>
- </tr>
- <tr>
- <td><img src="..\img\spacer_.gif" height="1px" width="10px"></td>
- <td colspan=3 class="helptext">
- <br>
- <%= Server.HTMLEncode( L_LOADINGDELTARESTART_TEXT ) %>
- </td>
- </tr>
- </table>
- <table border=0 cellspacing=0 cellpadding=0 class="propgroupbox" width="100%">
- <tr>
- <td><img src="..\img\spacer_.gif" height="1px" width="10px"></td>
- <td align=left>
- <% dwTabIndex = dwTabIndex + 1 %>
- <input type="radio"
- id="inproc"
- name="pluginloading"
- value="inproc" <% if bLoadInProc then %>checked<% end if %>
- tabIndex=<%= dwTabIndex %>>
- <label for="inproc" class="handcursor"><% RenderWithErrorCheck Server.HTMLEncode( strInProcess) , "inproc" %></label>
- </td>
- </tr>
- <tr>
- <td><img src="..\img\spacer_.gif" height="1px" width="10px"></td>
- <td align=left>
- <% dwTabIndex = dwTabIndex + 1 %>
- <input type="radio"
- id="oop"
- name="pluginloading"
- value="outofproc" <% if not bLoadInProc then %>checked<% end if %>
- tabIndex=<%= dwTabIndex %>>
- <label for="oop" class="handcursor"><% RenderWithErrorCheck Server.HTMLEncode( strOutOfProcess ), "oofproc" %></label>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- <%
- end sub
- %>